import AgDesign from '@ag/design'
import { type App } from 'vue'
import { constantRoutes } from '@/router'
import { filters } from './filters'

export default {
  install: (app: App) => {
    app.use(AgDesign, {
      businessId: 'sa-gis-web',
      businessName: 'GIS遥感基础平台V2.0',
      app,
      apiPrefixes: {
        algorithm: '/algorithm/'
      },
      defaultApiPrefix: 'algorithm',
      allRoutes: constantRoutes,
      tableListFilters: filters,
      apiOrigin: window[import.meta.env.VUE_APP_CONFIG as string].baseURL,
      routerBaseURL: import.meta.env.BASE_URL,
      appId: 'sa8c8a81b35b47141b',
      logoIcon: 'icon-svg-logo',
      fullLogoIcon: 'icon-svg-full_logo',
      routeMatchedField: 'path',
      platformId: window[import.meta.env.VUE_APP_CONFIG as string].platformId
    })
  }
}
